Skip to content

feat(scout-for-lol): fill the public champion and matchup pages' recent changes and tooltips - #5548

Merged
shepherdjerred merged 9 commits into
mainfrom
scout-public-recent-changes-tooltips
Dec 3, 2026
Merged

shepherdjerred merged 9 commits into
mainfrom
scout-public-recent-changes-tooltips

Conversation

@shepherdjerred

@shepherdjerred shepherdjerred commented Dec 3, 2026 •

Copy link
Copy Markdown
Owner

Why

The public champion page and matchup page (#5421, #5428) shipped with two empty slots. The champion page's "Recent changes" block waited on the patch-change reader and component (#5411), and nothing on either page opened a tooltip, which waited on the layered RichTooltip and the per-entity game facts (#5264). Both are on main now, so a nerfed core item was invisible and every icon was a dead end.

What

  • Recent changes on the champion page: RecentChanges fed by getRecentChampionChanges over the newest 8 patches, with the item ids of the slice's builds (every build path, what follows the core, the boots), so an item nerf shows beside the champion's own lines. Ages are measured from the snapshot's last day, so a rebuild of the same snapshot writes the same page. The win-rate before and after line is left out (no pipeline yet) and so is "See all changes" (no page lists every change). A champion the notes never touched shows "No changes in the last 8 patches".
  • One delegated tooltips island (client:idle) on both pages. Elements carry data-game-fact="<kind>/<key>" plus a name (gameFactAttributes in the data package); DelegatedGameFactTooltips listens on the document for the pointer or focus reaching one and mounts a RichTooltip on it through a new triggerElement, sharing the trigger rules with the rendered-trigger path. Facts load from the static /assets/scout/game/<patch>/facts/<kind>/<key>.json through loadGameFact. No Scout block: public pages have no viewer. Marked: champion cards and matchup rows, setup rows (runes, spells, items, skill-order abilities), later-game items and boots, the spell pair on the matchup page, and the item and ability names in Recent changes. Marked elements that a keyboard cannot reach get tabindex="0". A link keeps being a link on a phone (first tap shows the layer, second follows it); anything else opens the bottom sheet. Page-rendered triggers carry aria-haspopup, aria-expanded and aria-controls like a rendered trigger. The first tap on a phone opens the tooltip: the island holds back a click that lands before the tooltip has mounted and replays it. Tabbing away dismisses the tooltip at once; a pointer keeps the grace period. ChampionCard marks itself as a trigger only when given tooltip, so the champions index (no island) stays unmarked.
  • Deviation from the brief: the matchup mockups have no "Recent changes" block and MatchupPage has no mount point for one, so it is on the champion page only; the matchup page gets the tooltips.

Demo

Champion page, Syndra (has changes in 26.23 and 26.18), from the built fixture site. Recent changes is the new block; the tooltips are invisible until hovered.

Before After

Ahri, whom the notes never touched (the design-audit route), and the matchup page, which only gains tooltips:

Before After

Tooltips open, from the same build: an item in the core build (dark, 1440), a champion row (dark, 1440), an ability name in Recent changes, a rune (light, 1440), and the same item as a bottom sheet at 390.

Verification

  • bunx turbo run build typecheck test lint over design-system, data and every dependent (65 tasks, all green), then again at the final head over design-system, frontend, data, app and design-audit (all green); bun run jscpd (baseline ratchet passed); bun run check-directory-file-counts; lefthook pre-commit.
  • New tests: trigger helpers (data), the recent-changes model including "every row in the committed notes names a game fact file that exists" (frontend), the markup on SetupRow and ChampionCard (design-system), and the Domain/EntityTooltip → Delegated story with Playwright e2e for hover, hand-over between elements, keyboard focus, Tab hand-over and Escape (rich-tooltip.spec.ts, 10 passed, including the first tap on a phone).
  • Built the site from the fixture snapshot (astro build) and fetched the fact file behind every data-game-fact on the 175 champion and matchup pages: 161 distinct URLs, all HTTP 200 (/assets/scout/game/16.23.1/facts/<kind>/<key>.json ships in dist through copyScoutAssets). Hover, the item and champion tooltips, and the phone sheet were driven in the browser against that build.
  • Design audit harness. The dialog-trigger sweep counted [aria-haspopup="dialog"] once and revisited them by index, which cannot hold for one tooltip that moves between triggers. It now skips data-game-fact elements, and a new check (design-audit/src/tooltip-triggers.ts, unit-tested) takes one trigger per kind, finds each again by its own data-game-fact value on every visit, reaches it by hover (desktop) or tap (phone), and expects a dialog with its name and aria-haspopup, then Escape closes it.
  • Design audit, in the pinned ci-playwright image (linux/amd64, the digest in ci/ci-playwright/DIGEST), from a clean clone of the branch head, fixture snapshot, CI=true, with the /trpc/auth.sessionState request the navbar makes answered by a stub (no backend started): public/champions, public/champion and public/matchup across all themes and viewports compared against the committed baselines at the final head, 54 passed (axe, same-origin errors, keyboard focus indicators, dialog and tooltip triggers, baselines). Baselines: the champion route's 16 Chromium goldens are updated (the new block), and all 16 matchup goldens are regenerated. This corrects feat(scout-for-lol): add the public matchup page #5428's matchup baselines: the ones committed there include Astro's dev toolbar (a floating bar over the "In lane" panel), and CI runs the audit with it off. The built HTML of all 124 matchup pages is identical to main apart from the data-game-fact attributes and the island, so the matchup change here is the corrected baseline, not a layout change. The champions index goldens are untouched and pass.
  • Extended tier: none of design-system, frontend, data or app has tier: "extended" steps.
  • Not run: live deployment.

🤖 Generated with Claude Code

https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

…nt changes and tooltips

Why
The public champion page and matchup page shipped with two empty slots: the
champion page's "Recent changes" block (the patch-change reader and the
RecentChanges component are on main) and the rich tooltips (the layered
RichTooltip and the per-entity game-fact files are on main). Nothing on those
pages opened a tooltip, and a nerfed core item was invisible.

What
- The champion page mounts RecentChanges, fed by getRecentChampionChanges over
  the newest 8 patches with the item ids of the slice's builds (every build
  path, what follows the core, the boots), so an item nerf shows beside the
  champion's own lines. Ages are measured from the snapshot's last day so a
  rebuild writes the same page. No win-rate line (no pipeline yet) and no "See
  all changes" link (no page lists them). The matchup page has no such block in
  the mockups and none is added.
- One delegated tooltips island (client:idle) on both pages. Elements carry
  data-game-fact="<kind>/<key>" plus a name (gameFactAttributes in the data
  package); DelegatedGameFactTooltips listens on the document for the pointer
  or focus reaching one and mounts a RichTooltip on it. RichTooltip gains a
  triggerElement for an element the page rendered itself; the trigger rules
  are shared with the rendered-trigger path. Facts load from the static
  /assets/scout/game/<patch>/facts files through loadGameFact. No Scout block,
  since public pages have no viewer.
- Marked: champion cards and matchup rows (champions), setup rows (runes,
  spells, items, skill-order abilities), later-game items and boots, the spell
  pair on the matchup page, and the item and ability names in Recent changes.

Verification
- bunx turbo run build typecheck test lint over design-system, data and every
  dependent (65 tasks); new unit tests for the trigger helpers, the recent
  changes model (every row in the committed notes names an existing fact file)
  and the markup; Playwright e2e for the delegated story (hover, hand-over,
  keyboard focus).
- Built the site from the fixture snapshot and fetched all 161 distinct fact
  files the 175 champion and matchup pages name: all 200.
- Not run: live deployment.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
@shepherdjerred

Copy link
Copy Markdown
Owner Author

This change is part of the following stack:

Change managed by git-spice.

@greptile-apps

greptile-apps Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

shepherdjerred and others added 8 commits December 2, 2026 21:56
Why: the design audit clicks every aria-haspopup=dialog trigger and expects a dialog; a champion card is a link, so the click followed it. A link does not open a dialog, so it should not say it does.

What: a page-rendered trigger that is an anchor gets only data-open; other triggers keep aria-haspopup, aria-expanded and aria-controls. The Delegated story and its e2e cover a link.

Verification: rich-tooltip e2e (8 passed), design-system build, lint, typecheck.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
Why: the delegated tooltip moves between elements, so aria-haspopup came and went on whichever element held it, and the design audit's dialog-trigger sweep (which counts them once and then revisits them by index) lost its place. The elements are also links, list items and icons, which do not take those states.

What: a triggerElement gets data-open while its layer is open and no popup ARIA; rendered triggers are unchanged. The Delegated e2e asserts it.

Verification: rich-tooltip e2e (8 passed), design-system build, lint, typecheck.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…es its element

Why: a tooltip opened by keyboard focus stayed for the 150 ms pointer grace period after Tab moved on, so a page-wide focus sweep (the design audit's keyboard check) left the last tooltip open, and its own ability buttons joined the audit's dialog-trigger sweep.

What: focus leaving the active element unmounts its tooltip unless focus moves into the layer or the pointer is still on the element. New e2e: tabbing hands the tooltip over at once.

Verification: rich-tooltip e2e (9 passed), design-system build, lint, typecheck.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…element

Why: moving the matchup page's spell icons into a component left the colon after the second spell as its own text node, which the flex element spaced away ("Teleport :") and which wrapped the sentence, changing the page's height.

What: MatchupSpells takes a suffix that goes into the last spell's own text. The built matchup HTML is otherwise identical to main apart from the data-game-fact attributes and the island.

Verification: compared the normalised HTML of every matchup page between main and this branch (after removing the attributes and the island): identical for the pages checked; frontend typecheck and lint.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…or Recent changes

Why: the champion page gained its Recent changes block, so the 16 champion goldens no longer match.

What: regenerated the champion route's 16 Chromium baselines (four themes by four viewports) in the pinned ci-playwright image (linux/amd64) from a clone of the branch head, with the fixture snapshot. The matchup and champions-index goldens are untouched: the built matchup HTML of all 124 pages is identical to main apart from the data-game-fact attributes and the island, and the index only gains inert attributes.

Verification: design audit for public/champions, public/champion and public/matchup in that image: 54 passed (axe, same-origin errors, keyboard focus, dialog triggers, baselines).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
… and make the audit follow the tooltip

Why
Dropping aria-haspopup to satisfy the design audit was backwards. The audit's
dialog-trigger sweep counted triggers once and revisited them by index, which
cannot hold for one tooltip that moves between elements. Auditing the tooltip
properly also showed that the first tap on a phone opened nothing, because the
click lands before the tooltip has mounted.

What
- Page-rendered triggers carry aria-haspopup, aria-expanded and aria-controls
  again (a link too, as a rendered trigger does).
- The audit's index sweep skips data-game-fact elements. A new check
  (tooltip-triggers.ts) takes one trigger per kind, finds each again by its own
  data-game-fact value, reaches it by hover on desktop or tap on a phone, and
  expects a dialog with its name, aria-haspopup, and Escape to close it.
- The island holds back a click that arrives before its tooltip is listening,
  mounts the tooltip, and replays the click, so the first tap opens it (a link
  follows on the second tap).

Verification
- rich-tooltip e2e (10 passed, including the first-tap case); design-system and
  design-audit build, lint, typecheck and unit tests.
- The audit's public champion and matchup routes pass locally on Chromium
  desktop and mobile.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…e the island mounts

Why
ChampionCard marked every card with data-game-fact, including on the champions
index, which mounts no tooltip island. The audit's new tooltip check (rightly)
found cards there that open nothing.

What
ChampionCard takes `tooltip`, off by default; the champion page's "More
champions" and the matchup page's "against someone else" cards set it.

Verification
design-system, frontend and app build, typecheck, test and lint; the
ChampionCard test covers both states.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
…out the dev toolbar

Why
The matchup baselines committed with #5428 include Astro's dev toolbar (a
floating bar over the "In lane" panel), so they were wrong baselines; CI runs
the audit with the toolbar off.

What
Regenerated all 16 matchup Chromium baselines (four themes by four viewports)
in the pinned ci-playwright image (linux/amd64) with CI=true from a clone of the
branch, built site, fixture snapshot. This corrects #5428's baselines. The
champion baselines regenerated byte-identical to the ones in the previous
commit.

Verification
Design audit for public/champion and public/matchup in that image.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
@shepherdjerred
shepherdjerred marked this pull request as ready for review December 3, 2026 07:24
@shepherdjerred

Copy link
Copy Markdown
Owner Author

@codex review

Automated re-review request for a595184 from the CI review gate.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-03T07:28:05.672156Z a595184 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a59518477d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@shepherdjerred
shepherdjerred merged commit f21222e into main Dec 3, 2026
8 checks passed
@shepherdjerred
shepherdjerred deleted the scout-public-recent-changes-tooltips branch December 3, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant